From: Ian Campbell Date: Mon, 18 Oct 2010 16:38:15 +0000 (+0100) Subject: libxc: drop xc_get_max_pages X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11382 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=c4dff75bab5ff4158d091b1742a826ba57918109;p=xen.git libxc: drop xc_get_max_pages The function isn't really ia64 specific but since the result isn't actually used in the only caller and the same info is available via xc_domain_getinfo simply drop the function. Signed-off-by: Ian Campbell Signed-off-by: Ian Jackson --- diff --git a/tools/libxc/ia64/xc_ia64_hvm_build.c b/tools/libxc/ia64/xc_ia64_hvm_build.c index 72c776ef74..18be616b38 100644 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c @@ -1078,13 +1078,6 @@ xc_hvm_build(xc_interface *xch, uint32_t domid, int memsize, const char *image_n vcpu_guest_context_t *ctxt = &st_ctxt_any.c; char *image = NULL; unsigned long image_size; - unsigned long nr_pages; - - nr_pages = xc_get_max_pages(xch, domid); - if (nr_pages < 0) { - PERROR("Could not find total pages for domain"); - goto error_out; - } image = xc_read_image(xch, image_name, &image_size); if (image == NULL) { diff --git a/tools/libxc/ia64/xc_ia64_stubs.c b/tools/libxc/ia64/xc_ia64_stubs.c index fecfe01967..7f63727e0a 100644 --- a/tools/libxc/ia64/xc_ia64_stubs.c +++ b/tools/libxc/ia64/xc_ia64_stubs.c @@ -66,16 +66,6 @@ xc_get_pfn_list(xc_interface *xch, uint32_t domid, uint64_t *pfn_buf, 0, max_pfns); } -long -xc_get_max_pages(xc_interface *xch, uint32_t domid) -{ - struct xen_domctl domctl; - domctl.cmd = XEN_DOMCTL_getdomaininfo; - domctl.domain = (domid_t)domid; - return ((do_domctl(xch, &domctl) < 0) - ? -1 : domctl.u.getdomaininfo.max_pages); -} - /* It is possible to get memmap_info and memmap by foreign domain page mapping. But it's racy. Use hypercall to avoid race. */ static int diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index 4e9493c796..18b3192acf 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -976,8 +976,6 @@ int xc_copy_to_domain_page(xc_interface *xch, uint32_t domid, int xc_clear_domain_page(xc_interface *xch, uint32_t domid, unsigned long dst_pfn); -long xc_get_max_pages(xc_interface *xch, uint32_t domid); - int xc_mmuext_op(xc_interface *xch, struct mmuext_op *op, unsigned int nr_ops, domid_t dom);